/*
 
 */
package com.jme3.gde.gui.extra.xam.model.impl;

import com.jme3.gde.gui.extra.xam.model.NiftyAttribute;
import java.util.List;
import org.w3c.dom.Element;
import com.jme3.gde.gui.extra.xam.model.EffectValueType;
import com.jme3.gde.gui.extra.xam.model.NiftyModel;
import com.jme3.gde.gui.extra.xam.model.NiftyQName;
import com.jme3.gde.gui.extra.xam.model.SingleEffectTypeBase;
import com.jme3.gde.gui.extra.xam.model.visitor.NiftyComponentVisitor;	

/**
 * Implementation for domain component singleEffectTypeBase.
 * 
 * @author cuongnguyen
 */
// Generated by XAM AutoGen Tool v0.2
public class SingleEffectTypeBaseImpl extends NameableNiftyComponentImpl implements SingleEffectTypeBase {

    public SingleEffectTypeBaseImpl(NiftyModel model, Element element) {
        super(model, element);
    }
    
    public SingleEffectTypeBaseImpl(NiftyModel model) {
        this(model, createElementNS(model, NiftyQName.SINGLEEFFECTTYPEBASE));
    }

    // attributes

    public String getStartDelay() {
        return getAttribute(NiftyAttribute.STARTDELAY);
    }

    public void setStartDelay(String startDelay) {
        setAttribute(STARTDELAY_PROPERTY, NiftyAttribute.STARTDELAY, startDelay);
    }

    public String getLength() {
        return getAttribute(NiftyAttribute.LENGTH);
    }

    public void setLength(String length) {
        setAttribute(LENGTH_PROPERTY, NiftyAttribute.LENGTH, length);
    }

    public boolean isOneShot() {
        return Boolean.parseBoolean(getAttribute(NiftyAttribute.ONESHOT));
    }

    public void setOneShot(boolean oneShot) {
        setAttribute(ONESHOT_PROPERTY, NiftyAttribute.ONESHOT, oneShot);
    }

    public String getTimeType() {
        return getAttribute(NiftyAttribute.TIMETYPE);
    }

    public void setTimeType(String timeType) {
        setAttribute(TIMETYPE_PROPERTY, NiftyAttribute.TIMETYPE, timeType);
    }

    public String getFactor() {
        return getAttribute(NiftyAttribute.FACTOR);
    }

    public void setFactor(String factor) {
        setAttribute(FACTOR_PROPERTY, NiftyAttribute.FACTOR, factor);
    }

    public boolean isInherit() {
        return Boolean.parseBoolean(getAttribute(NiftyAttribute.INHERIT));
    }

    public void setInherit(boolean inherit) {
        setAttribute(INHERIT_PROPERTY, NiftyAttribute.INHERIT, inherit);
    }

    public boolean isPost() {
        return Boolean.parseBoolean(getAttribute(NiftyAttribute.POST));
    }

    public void setPost(boolean post) {
        setAttribute(POST_PROPERTY, NiftyAttribute.POST, post);
    }

    public String getAlternateEnable() {
        return getAttribute(NiftyAttribute.ALTERNATEENABLE);
    }

    public void setAlternateEnable(String alternateEnable) {
        setAttribute(ALTERNATEENABLE_PROPERTY, NiftyAttribute.ALTERNATEENABLE, alternateEnable);
    }

    public String getAlternateDisable() {
        return getAttribute(NiftyAttribute.ALTERNATEDISABLE);
    }

    public void setAlternateDisable(String alternateDisable) {
        setAttribute(ALTERNATEDISABLE_PROPERTY, NiftyAttribute.ALTERNATEDISABLE, alternateDisable);
    }

    public String getOnStartEffect() {
        return getAttribute(NiftyAttribute.ONSTARTEFFECT);
    }

    public void setOnStartEffect(String onStartEffect) {
        setAttribute(ONSTARTEFFECT_PROPERTY, NiftyAttribute.ONSTARTEFFECT, onStartEffect);
    }

    public String getOnEndEffect() {
        return getAttribute(NiftyAttribute.ONENDEFFECT);
    }

    public void setOnEndEffect(String onEndEffect) {
        setAttribute(ONENDEFFECT_PROPERTY, NiftyAttribute.ONENDEFFECT, onEndEffect);
    }

    // child elements

    public List<EffectValueType> getEffectValueTypes() {
        return getChildren(EffectValueType.class);
    }

    public void addEffectValueType(EffectValueType effectValueType) {
        appendChild(EFFECTVALUETYPE_PROPERTY, effectValueType);
    }

    public void removeEffectValueType(EffectValueType effectValueType) {
        removeChild(EFFECTVALUETYPE_PROPERTY, effectValueType);
    }

    public void accept(NiftyComponentVisitor visitor) {
        visitor.visit(this);
    }

}